﻿namespace Suture.Exceptions
{
    using System;
    using System.Linq;

    public class ConstructorResolutionException : Exception
    {
        public ConstructorResolutionException(Type[] constructorParameters) 
            : base(string.Format(
                "Could not find a constructor that matched the parameters {0}", 
                string.Join(", ", constructorParameters.Select(p => p.FullName))))
        {
            this.ConstructorParameters = constructorParameters;
        }

        public Type[] ConstructorParameters { get; private set; }
    }
}